﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using com.hk.validate.Common;

namespace WebApplication1.Test.Validate
{
    [TestClass]
    public class RequiredValitor
    {
        [TestMethod]
        [TestCategory("RequiredValitor")]
        public void TestMethod1()
        {
            bool isValidate = false;
            RequiredValidator requiredValidator = new RequiredValidator("");
            isValidate = requiredValidator.Validate();

            requiredValidator.Value = DateTime.MinValue;
            bool flag = requiredValidator.Validate();

            requiredValidator.Value = null;
            bool flag2 = requiredValidator.Validate();

            Assert.IsTrue(isValidate == false);
            Assert.IsTrue(flag == true);
            Assert.IsTrue(flag2 == false);
        }
        [TestMethod]
        [TestCategory("RequiredValitor")]
        public void TestMethod2()
        {
            bool isValidate = RequiredValidator.Validate("");            
            bool flag = RequiredValidator.Validate(DateTime.MinValue);
            bool flag2 = RequiredValidator.Validate(null);

            Assert.IsTrue(isValidate == false);
            Assert.IsTrue(flag == true);
            Assert.IsTrue(flag2 == false);
        }
    }
}
